/*
 * LoginFrame.java
 *
 * Created on Jan 10, 2012, 3:12:08 PM
 */
package kernel_gui.gui.generic.graphic;

import java.awt.AWTError;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;

import kernel_gui.gui.generic.BackGroundPanel;
import kernel_gui.gui.generic.MillionaireFrame;

/**
 *
 * @author Yoyo
 */
@SuppressWarnings("serial")
public abstract class ControlCountries extends MillionaireFrame {

    /** Creates new form LoginFrame */
    public ControlCountries() {
    	super(true);
        initComponents();
    }

    @SuppressWarnings({ "unchecked", "rawtypes" })
    private void initComponents() {

        LayeredPane = new javax.swing.JLayeredPane();
        MainPanel = new javax.swing.JPanel();
        ActionsPanel = new javax.swing.JPanel();
        DeleteButton = new javax.swing.JButton();
        UpdateButton = new javax.swing.JButton();
        InsertButton = new javax.swing.JButton();
        SearchPanel = new javax.swing.JPanel();
        PartOfCountryNameLabel = new javax.swing.JLabel();
        PartOfCountryNameTextField = new javax.swing.JTextField();
        SearchButton = new javax.swing.JButton();
        ResultPanel = new javax.swing.JPanel();
        PreviousButton = new javax.swing.JButton();
        NumOfRecordsHeadLabel = new javax.swing.JLabel();
        NumOfRecordsInPageComboBox = new javax.swing.JComboBox();
        NumOfRecordsTailLabel = new javax.swing.JLabel();
        ResultScrollPane = new javax.swing.JScrollPane();
        ResultTable = new javax.swing.JTable();
        NextButton = new javax.swing.JButton();
        ResultStatPanel = new javax.swing.JPanel();
        FoundLabel = new javax.swing.JLabel();
        TotalPageNumberLabel = new javax.swing.JLabel();
        FoundNumberLabel = new javax.swing.JLabel();
        RecordsLabel = new javax.swing.JLabel();
        PageLabel = new javax.swing.JLabel();
        PageNumberLabel = new javax.swing.JLabel();
        OfLabel = new javax.swing.JLabel();
        BackButton = new javax.swing.JButton();
        LoadingPanel = new javax.swing.JPanel();
        SpinningDollarLabel = new javax.swing.JLabel();
        TopMessageLabel = new javax.swing.JLabel();
        CancelButton = new javax.swing.JButton();

        /* My init code */
       	int frameWidth = 520;
       	int frameHeight = 460;
       	this.setBounds(new Rectangle(new Dimension(frameWidth, frameHeight)));
       	this.setIconImage(new javax.swing.ImageIcon("images/Green-Dollar-icon.png").getImage());
       	this.setTitle("Conrol Panel - Countries");
       	LayeredPane.setOpaque(false);
       	LoadingPanel.setVisible(false);
       	LoadingPanel.setOpaque(false);
       	setResizable(false);
       	try{
       		Toolkit tk = Toolkit.getDefaultToolkit();
       		int framePosWidth = tk.getScreenSize().width / 2 - frameWidth / 2;
       		int framePosHeight = tk.getScreenSize().height / 2 - frameHeight / 2;
       		Point p = new Point(framePosWidth, framePosHeight);
       		this.setLocation(p);
       	}catch(AWTError e){
       		/*Nothing to do*/
       	}
       	BGPanel = new BackGroundPanel(frameWidth, frameHeight);
           MainPanel = new BackGroundPanel(frameWidth, frameHeight);
       	SpinningDollarLabel.setIcon(new javax.swing.ImageIcon(
       			"images/dollar-spinning.gif")); // NOI18N
       	/* end */

        BGPanel.setOpaque(false);
        BGPanel.setPreferredSize(new java.awt.Dimension(680, 660));

        LayeredPane.setPreferredSize(null);

        LoadingPanel.setOpaque(false);
        LoadingPanel.setPreferredSize(new java.awt.Dimension(700, 670));


        TopMessageLabel.setBackground(new java.awt.Color(51, 102, 0));
        TopMessageLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        TopMessageLabel.setForeground(new java.awt.Color(51, 204, 0));
        TopMessageLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        TopMessageLabel.setText("Loading Please wait");

        CancelButton.setFont(new java.awt.Font("Tahoma", 1, 14));
        CancelButton.setText("Cancel");
        CancelButton.setOpaque(false);
        CancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                CancelButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout LoadingPanelLayout = new javax.swing.GroupLayout(LoadingPanel);
        LoadingPanel.setLayout(LoadingPanelLayout);
        LoadingPanelLayout.setHorizontalGroup(
            LoadingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(LoadingPanelLayout.createSequentialGroup()
                .addGap(223, 223, 223)
                .addGroup(LoadingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(LoadingPanelLayout.createSequentialGroup()
                        .addGap(16, 16, 16)
                        .addComponent(SpinningDollarLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(TopMessageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(LoadingPanelLayout.createSequentialGroup()
                        .addGap(27, 27, 27)
                        .addComponent(CancelButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(242, 242, 242))
        );
        LoadingPanelLayout.setVerticalGroup(
            LoadingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, LoadingPanelLayout.createSequentialGroup()
                .addContainerGap(157, Short.MAX_VALUE)
                .addComponent(SpinningDollarLabel)
                .addGap(18, 18, 18)
                .addComponent(TopMessageLabel)
                .addGap(34, 34, 34)
                .addComponent(CancelButton)
                .addGap(137, 137, 137))
        );

        LoadingPanel.setBounds(0, 0, 600, 460);
        LayeredPane.add(LoadingPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        MainPanel.setOpaque(false);

        ActionsPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        ActionsPanel.setOpaque(false);

        DeleteButton.setFont(new java.awt.Font("Tahoma", 1, 14));
        DeleteButton.setText("Delete");
        DeleteButton.setOpaque(false);
        DeleteButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DeleteButtonActionPerformed(evt);
            }
        });

        UpdateButton.setFont(new java.awt.Font("Tahoma", 1, 14));
        UpdateButton.setText("Update");
        UpdateButton.setOpaque(false);
        UpdateButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                UpdateButtonActionPerformed(evt);
            }
        });

        InsertButton.setFont(new java.awt.Font("Tahoma", 1, 14));
        InsertButton.setText("New Record");
        InsertButton.setOpaque(false);
        InsertButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                InsertButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout ActionsPanelLayout = new javax.swing.GroupLayout(ActionsPanel);
        ActionsPanel.setLayout(ActionsPanelLayout);
        ActionsPanelLayout.setHorizontalGroup(
            ActionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ActionsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ActionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(DeleteButton, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(UpdateButton, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(InsertButton, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))
                .addContainerGap())
        );
        ActionsPanelLayout.setVerticalGroup(
            ActionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ActionsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(DeleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(UpdateButton, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(InsertButton, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)
                .addContainerGap())
        );

        SearchPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        SearchPanel.setOpaque(false);

        PartOfCountryNameLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        PartOfCountryNameLabel.setText("Part of Country Name:");

        PartOfCountryNameTextField.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
 

        SearchButton.setFont(new java.awt.Font("Tahoma", 1, 14));
        SearchButton.setText("SEARCH!");
        SearchButton.setOpaque(false);
        SearchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SearchButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout SearchPanelLayout = new javax.swing.GroupLayout(SearchPanel);
        SearchPanel.setLayout(SearchPanelLayout);
        SearchPanelLayout.setHorizontalGroup(
            SearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SearchPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(SearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(SearchButton, javax.swing.GroupLayout.DEFAULT_SIZE, 404, Short.MAX_VALUE)
                    .addGroup(SearchPanelLayout.createSequentialGroup()
                        .addComponent(PartOfCountryNameLabel)
                        .addGap(18, 18, 18)
                        .addComponent(PartOfCountryNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 229, Short.MAX_VALUE)))
                .addContainerGap())
        );
        SearchPanelLayout.setVerticalGroup(
            SearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SearchPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(SearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(PartOfCountryNameLabel)
                    .addComponent(PartOfCountryNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(SearchButton)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        ResultPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        ResultPanel.setOpaque(false);

        PreviousButton.setFont(new java.awt.Font("Tahoma", 1, 14));
        PreviousButton.setText("<<");
        PreviousButton.setOpaque(false);
        PreviousButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                PreviousButtonActionPerformed(evt);
            }
        });

        NumOfRecordsHeadLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        NumOfRecordsHeadLabel.setText("Show");

        NumOfRecordsInPageComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "5", "10", "25", "50", "100" }));
        NumOfRecordsInPageComboBox.setOpaque(false);
        NumOfRecordsInPageComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                NumOfRecordsInPageComboBoxActionPerformed(evt);
            }
        });

        NumOfRecordsTailLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        NumOfRecordsTailLabel.setText("Records in page");

        ResultScrollPane.setOpaque(false);

        ResultTable.setAutoCreateRowSorter(true);
        ResultTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Country Name"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        ResultTable.getTableHeader().setReorderingAllowed(false);
        ResultScrollPane.setViewportView(ResultTable);

        NextButton.setFont(new java.awt.Font("Tahoma", 1, 14));
        NextButton.setText(">>");
        NextButton.setOpaque(false);
        NextButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                NextButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout ResultPanelLayout = new javax.swing.GroupLayout(ResultPanel);
        ResultPanel.setLayout(ResultPanelLayout);
        ResultPanelLayout.setHorizontalGroup(
            ResultPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ResultPanelLayout.createSequentialGroup()
                .addContainerGap(122, Short.MAX_VALUE)
                .addComponent(NumOfRecordsHeadLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(NumOfRecordsInPageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(NumOfRecordsTailLabel)
                .addGap(37, 37, 37)
                .addComponent(NextButton)
                .addContainerGap())
            .addGroup(ResultPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(ResultPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(ResultPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(ResultPanelLayout.createSequentialGroup()
                            .addComponent(ResultScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 404, Short.MAX_VALUE)
                            .addContainerGap())
                        .addComponent(PreviousButton))))
        );
        ResultPanelLayout.setVerticalGroup(
            ResultPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ResultPanelLayout.createSequentialGroup()
                .addContainerGap(300, Short.MAX_VALUE)
                .addGroup(ResultPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(NextButton)
                    .addComponent(NumOfRecordsHeadLabel)
                    .addComponent(NumOfRecordsInPageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(NumOfRecordsTailLabel))
                .addContainerGap())
            .addGroup(ResultPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ResultPanelLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(ResultScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                    .addGap(9, 9, 9)
                    .addComponent(PreviousButton)
                    .addContainerGap()))
        );

        ResultStatPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        ResultStatPanel.setOpaque(false);

        FoundLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        FoundLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        FoundLabel.setText("Found");

        TotalPageNumberLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        TotalPageNumberLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        TotalPageNumberLabel.setText("0");

        FoundNumberLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        FoundNumberLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        FoundNumberLabel.setText("0");

        RecordsLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        RecordsLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        RecordsLabel.setText("Records");

        PageLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        PageLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        PageLabel.setText("Page");

        PageNumberLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        PageNumberLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        PageNumberLabel.setText("0");

        OfLabel.setFont(new java.awt.Font("Tahoma", 1, 14));
        OfLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        OfLabel.setText("Of");

        javax.swing.GroupLayout ResultStatPanelLayout = new javax.swing.GroupLayout(ResultStatPanel);
        ResultStatPanel.setLayout(ResultStatPanelLayout);
        ResultStatPanelLayout.setHorizontalGroup(
            ResultStatPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ResultStatPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(ResultStatPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(FoundLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(FoundNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(RecordsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(PageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(PageNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(OfLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
                    .addComponent(TotalPageNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))
                .addContainerGap())
        );
        ResultStatPanelLayout.setVerticalGroup(
            ResultStatPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ResultStatPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(FoundLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(FoundNumberLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(RecordsLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(PageNumberLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(OfLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(TotalPageNumberLabel)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        BackButton.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        BackButton.setText("Back");
        BackButton.setOpaque(false);
        BackButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BackButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout MainPanelLayout = new javax.swing.GroupLayout(MainPanel);
        MainPanel.setLayout(MainPanelLayout);
        MainPanelLayout.setHorizontalGroup(
            MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(MainPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(ResultPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(SearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(BackButton, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                    .addComponent(ActionsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(ResultStatPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        MainPanelLayout.setVerticalGroup(
            MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(MainPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(MainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(MainPanelLayout.createSequentialGroup()
                        .addComponent(SearchPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(ResultPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(MainPanelLayout.createSequentialGroup()
                        .addComponent(ResultStatPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(ActionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(BackButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );

        MainPanel.setBounds(0, 0, 600, 460);
        LayeredPane.add(MainPanel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout BGPanelLayout = new javax.swing.GroupLayout(BGPanel);
        BGPanel.setLayout(BGPanelLayout);
        BGPanelLayout.setHorizontalGroup(
            BGPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 600, Short.MAX_VALUE)
            .addGroup(BGPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(LayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE))
        );
        BGPanelLayout.setVerticalGroup(
            BGPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 462, Short.MAX_VALUE)
            .addGroup(BGPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(LayeredPane, javax.swing.GroupLayout.DEFAULT_SIZE, 462, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(BGPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(BGPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 462, Short.MAX_VALUE)
        );

        pack();
    }
                                      

    protected abstract void NumOfRecordsInPageComboBoxActionPerformed(ActionEvent evt);

	protected abstract void SearchButtonActionPerformed(java.awt.event.ActionEvent evt);                             

    protected abstract void InsertButtonActionPerformed(java.awt.event.ActionEvent evt);                                     

    protected abstract void NextButtonActionPerformed(java.awt.event.ActionEvent evt);

    protected abstract void PreviousButtonActionPerformed(java.awt.event.ActionEvent evt);

    protected abstract void UpdateButtonActionPerformed(java.awt.event.ActionEvent evt);

    protected abstract void DeleteButtonActionPerformed(java.awt.event.ActionEvent evt);

    protected abstract void BackButtonActionPerformed(java.awt.event.ActionEvent evt);


    protected javax.swing.JPanel ActionsPanel;
    protected javax.swing.JPanel BGPanel;
    protected javax.swing.JButton BackButton;
    protected javax.swing.JButton DeleteButton;
    protected javax.swing.JLabel FoundLabel;
    protected javax.swing.JLabel FoundNumberLabel;
    protected javax.swing.JButton InsertButton;
    protected javax.swing.JLayeredPane LayeredPane;
    protected javax.swing.JButton NextButton;
    protected javax.swing.JLabel NumOfRecordsHeadLabel;
    @SuppressWarnings("rawtypes")
	protected javax.swing.JComboBox NumOfRecordsInPageComboBox;
    protected javax.swing.JLabel NumOfRecordsTailLabel;
    protected javax.swing.JLabel OfLabel;
    protected javax.swing.JLabel PageLabel;
    protected javax.swing.JLabel PageNumberLabel;
    protected javax.swing.JLabel PartOfCountryNameLabel;
    protected javax.swing.JTextField PartOfCountryNameTextField;
    protected javax.swing.JButton PreviousButton;
    protected javax.swing.JLabel RecordsLabel;
    protected javax.swing.JPanel ResultPanel;
    protected javax.swing.JScrollPane ResultScrollPane;
    protected javax.swing.JPanel ResultStatPanel;
    protected javax.swing.JTable ResultTable;
    protected javax.swing.JButton SearchButton;
    protected javax.swing.JPanel SearchPanel;
    protected javax.swing.JLabel SpinningDollarLabel;
    protected javax.swing.JLabel TopMessageLabel;
    protected javax.swing.JLabel TotalPageNumberLabel;
    protected javax.swing.JButton UpdateButton;
}
